<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core"
                xmlns:constants="http://www.tuanzi.com/constants/tags"
                xmlns:security="http://www.springframework.org/security/tags"
                template="/templates/template.xhtml">
    <ui:define name="title">代偿取现甲方信息</ui:define>
    <ui:define name="content">
        <h:form>
            <div class="topbar clearfix"
                 style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="right">
                        <p:commandButton value="编辑" icon="fa fa-edit"
                                         actionListener="#{compensationCompanyInfoBean.changeStatusToEdit}"
                                         process="@this"
                                         update="@form" rendered="#{compensationCompanyInfoBean.isView()}"/>
                        <p:commandButton value="保存" icon="fa fa-save"
                                         action="#{compensationCompanyInfoBean.onSave()}"
                                         update="@form"
                                         rendered="#{compensationCompanyInfoBean.isAdd() || compensationCompanyInfoBean.isEdit()}"/>
                        <p:button value="返回" icon="fa fa-reply-all" href="#{currentUserBean.back}"/>
                    </f:facet>
                </p:toolbar>
            </div>
            <div class="ui-g ui-fluid" style="padding-top: 30px;">
                <div class="ui-g-12 ">
                    <div class="ui-g-12 card">
                        <h1>基础信息</h1>

                        <div class="ui-g-12">
                            <div class="ui-g-2">
                                <p:outputLabel value="甲方编号"/>
                            </div>
                            <div class="ui-g-4">
                                <p:inputText id="companyType" value="#{compensationCompanyInfoBean.$.companyType}"
                                             disabled="#{compensationCompanyInfoBean.isView()}"/>
                            </div>
                            <div class="ui-g-2">
                                <p:outputLabel value="甲方名称"/>
                            </div>
                            <div class="ui-g-4">
                                <p:inputText id="companyName" value="#{compensationCompanyInfoBean.$.companyName}"
                                             disabled="#{compensationCompanyInfoBean.isView()}"/>

                            </div>

                            <div class="ui-g-2">
                                <p:outputLabel value="费率"/>
                            </div>
                            <div class="ui-g-4">
                                <div class="input-group">
                                    <p:inputText id="feeRate" value="#{compensationCompanyInfoBean.$.feeRate}"
                                                 disabled="#{compensationCompanyInfoBean.isView()}"/>
                                    <span class="input-group-addon">%</span>
                                </div>

                            </div>

                            <div class="ui-g-2">
                                <p:outputLabel value="固定手续费"/>
                            </div>
                            <div class="ui-g-4">
                                <div class="input-group">
                                    <p:inputText id="fixFee" value="#{compensationCompanyInfoBean.$.fixFee}"
                                                 disabled="#{compensationCompanyInfoBean.isView()}"/>
                                    <span class="input-group-addon">元</span>
                                </div>
                            </div>


                            <div class="ui-g-2">
                                <p:outputLabel value="扣款类型"/>
                            </div>
                            <div class="ui-g-4">
                                <p:selectOneMenu id="type" value="#{compensationCompanyInfoBean.$.type}"
                                                 disabled="#{compensationCompanyInfoBean.isView()}">
                                    <f:selectItem itemLabel="- 请选择 -" itemValue=""
                                                  noSelectionOption="true"/>
                                    <f:selectItem itemLabel="申请金额（不包括手续费）" itemValue="1"/>
                                    <f:selectItem itemLabel="申请金额（包括手续费）" itemValue="2"/>
                                </p:selectOneMenu>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </h:form>
    </ui:define>
</ui:composition>